home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
DEV
/
I-Z
/
ResEdit2.1 Examples.sea
/
Examples
/
Libraries
/
RSSC.a
< prev
next >
Wrap
Text File
|
1990-12-06
|
3KB
|
96 lines
;
; COPYRIGHT (C) 1984-1990 Apple Computer,Inc.
; All rights reserved
; This is the standard interface for a Resource Standard Code segment for use
; by the resource editor. The main resource editor will dispatch to this code
; when the user opens the respective type for editing. Dispatches will also
; occur with menu commands and events for this window. This code should be
; included in the resource editor file under type RSSC with any unique ID. It's
; resource name should consist of the type it's willing to edit or 'ALL' if it
; can edit all types of resources. {This comment is too old...}
; Each code segment MUST have a window and its kind MUST be the ID of the code and
; the refcon usually contains the handle to the instance of the object who's
; owned by the code. On activate/deactivate events, the code can put up and
; remove any menus if desired.
; The standard routines are:
; EditBirth( thing:Handle; parent: ParentHandle );
; PickBirth( t: ResType; parent: ParentHandle );
; DoMenu( menu, item: INTEGER; object: Handle );
; DoEvent( VAR evt: EvtRecord; object: Handle );
BLANKS ON
STRING ASIS
INCLUDE 'Traps.a'
StdRSSC MAIN
; Implemented in pascal for now...
IMPORT PickBirth
IMPORT EditBirth
IMPORT DoEvent
IMPORT DoMenu
IMPORT DoInfoUpdate
IMPORT IsThisYours
EXPORT ResEdID
StdHeader
DC.L ('RSSC')
DC.W JEditBirth-StdHeader
DC.W JPickBirth-StdHeader
DC.W JDoEvent-StdHeader
DC.W JDoMenu-StdHeader
DC.W JDoInfoUpdate-StdHeader
DC.W JIsThisYours-StdHeader
DC.W 0
DC.W 0
DC.W 0
JEditBirth
; someday search for a window which satisfies this request
JMP EditBirth
JPickBirth
JMP PickBirth
JDoEvent
JMP DoEvent
JDoMenu
JMP DoMenu
JDoInfoUpdate
JMP DoInfoUpdate
JIsThisYours
JMP IsThisYours
; Gets Res ID of self and returns it
; FUNCTION ResEdID: INTEGER;
ResEdID
LINK A6,#-256
LEA StdHeader,A0
_RecoverHandle
MOVE.L A0,-(SP) ; pass handle
PEA 8(A6) ; function result
PEA -256(A6) ; ignore type
MOVE.L (SP),-(SP) ; ignore name
_GetResInfo
UNLK A6
RTS
END